/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = (appInfo) => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = (exports = {});

  // add your config here

  // 加载 errorHandler 中间件
  config.middleware = ['errorHandler'];

  config.security = {
    csrf: { enable: false }
  };

  config.sequelize = {
    connectionUri: 'postgresql://tencentdb_nmyom7vv:G1lW45%5DQKmp%23)q6@postgres-nmyom7vv.sql.tencentcdb.com:53518/tencentdb_nmyom7vv'
    // 数据库内网
    // postgresql://tencentdb_nmyom7vv:G1lW45%5DQKmp%23)q6@10.0.0.10:5432/tencentdb_nmyom7vv
  };

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1618993016761_4697';

  config.tencentCloud = {
    secretId: 'AKIDxHMDvOc6IFgsZ3Nmy0ubQcdSPbbNGfGl',
    secretKey: 'RdbR3QoxwjZwa4pW06x83jBIBpDMkvlL'
  };

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig
  };
};
